<%@page import="monster.comm.util.SpringApplicationContextFactory"%>
<%@page import="monster.flight.admin.manager.service.admin.Flight_infoService"%>
<%@page import="monster.flight.comm.util.FlightFactory"%>
<%@page import="monster.comm.util.DateUtil"%>
<%@page import="monster.flight.comm.entity.vo.FlightBay"%>
<%@page import="sun.jdbc.rowset.CachedRowSet"%>
<%@page import="monster.flight.comm.entity.vo.Flight_info"%>
<%@page import="monster.comm.database.DBManager"%>
<%@page import="monster.comm.util.SysConstant"%>
<%@page import="monster.comm.util.UserService"%>
<%@page import="monster.comm.util.Tool"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String staff_name=Tool.getRequest("staff_name",request);//名字

String list="";
UserService user = (UserService) session.getAttribute(SysConstant.SESSION_NAME);//获得session里面的登陆信息
if(1==2){
	out.println("{\"id\":-100,\"name\":\"没有登录\"}");
	return;
}else{
	try{
		DBManager db = new DBManager();
		String sql="select STAFF_SN from STAFF_INFO where staff_name='"+staff_name+"'";
							
		CachedRowSet cr = db.getRowSet(sql);
		StringBuilder sb = new StringBuilder(200);
		if(cr.next()){
			String staff_sn = Tool.getRsValue(cr,"staff_sn");
					
			sb.append("{\"staff_sn\":\"").append(staff_sn).append("\"")
			
			.append("}");
			
		}		
		if(cr.size()>0){
			 list="{\"id\":100,\"list\":["+sb.toString()+"]}";
		}else{
			 list="{\"id\":101}";
		}
		
	}catch(Exception e){
		 e.printStackTrace();
		 list="{\"id\":-200,\"name\":\"程序异常\"}";
	}
	
	out.println(list);

}
%>
